Create unique ID depending on text in different column

Hi All,

I have imported a word file into DOORS 8.2. I now need to identify and create a unique requirement ID for the requirements which have come from the word file and ignore the text in the object fields which are not requirements e.g headings etc

The way i have done this is....

I have just set up two columns.

One is called 'Unique ID' and the other is called 'Is Req'

What i want to do, is when someone selcts 'True' in the 'Is Req' column, i would like a unique requirement ID created starting with SR-(automatic number).

Is this possible to do?
San001 - Wed Mar 16 12:22:38 EDT 2011

Re: Create unique ID depending on text in different column
adevicq - Wed Mar 16 13:00:33 EDT 2011

Hi,

FYI DOORS provides a unique object ID.
Display the attribute "Object Identifier" in your view.
You can choose the prefix used for the Req Id by changing the prefix attribute (file / module properties, double click on "prefix" and change its value).

Regards,

Alain

Re: Create unique ID depending on text in different column
llandale - Wed Mar 16 13:49:36 EDT 2011

Your "Unique ID" attribute could actually be a Attr-DXL such that when the object is a requirement then this attribute gets the current Object Absolute Number, otherwise not.

if (obj."IsReq") //
then obj.attrDXLName = "SR-" probeAttr(obj, "Absolute Number")
else obj.attrDXLName = ""


You just have to not have a cow when your Requirement IDs are not sequencial, numbers 4-8 don't exist.

Assigning a next ID number with code gets kind of tricky; very tricky when the module might be used in Shared mode, and you must deal with the case when the last number was assigned but then the object purged. Use config files.

 

 

  • Louie